<!DOCTYPE html>


<link rel="stylesheet" href="https://www.layuicdn.com/layui/css/layui.css"  media="all">
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
<script src="https://www.layuicdn.com/layui/layui.js"></script>
<body>
<form class="layui-form" action="">
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="checkbox" name="like[write]" title="团队1"><br>
            <input type="checkbox" name="like[read]" title="团队2" checked>
        </div>
    </div>

<!--    <div class="layui-form-item">-->
<!--        <div class="layui-input-block">-->
<!--            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>-->
<!--            <button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
<!--        </div>-->
<!--    </div>-->
</form>

<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>

</body>
</html>
